import { queryUserLog, queryGj } from '@/services/auditLog/fileSource';

export default {
  namespace: 'Transformation',

  state: {
    // 列表数据
    data: {
      dataList: [],
      pageNum: 0,
      pageSize: 0,
      totalCount: 0,
    },

    queryForm:{},

  },

  effects: {
    *queryList({ payload }, { call, put }) {
      const response = yield call(queryUserLog, payload);
      yield put({
        type: 'save',
        payload: response,
      });
    },
    *getGj({ payload, callback }, { call, put }) {
      const response = yield call(queryGj, payload);
      yield put({
        type: 'savegetGj',
        payload: response,
      });
      if (callback) callback(response);
    },
  },

  reducers: {
    save(state, action) {
      return {
        ...state,
        data: action.payload.data,
      };
    },
  },
};
